package com.managertrade.controller;


import com.managertrade.dto.BacktestRequestDTO;
import com.managertrade.dto.vo.BacktestResultVO;
import com.managertrade.service.impl.BacktestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/backtest")
public class BacktestController {

    @Autowired
    private BacktestService backtestService;

    @PostMapping("/run")
    public BacktestResultVO runBacktest(@RequestBody BacktestRequestDTO payload) {
        return backtestService.runBacktest(payload);
    }
}
